﻿using System.Configuration;

namespace HelpersDotNet.DomainDrivenDesign.Infrastructure.EntityFactoryFramework.Configuration
{
    public sealed class EntityMappingElement : ConfigurationElement
    {
        [ConfigurationProperty(EntityMappingConstants.EntityShortTypeNameAttributeName,
            IsKey = true, IsRequired = true)]
        public string EntityShortTypeName
        {
            get { return this[EntityMappingConstants.EntityShortTypeNameAttributeName].ToString(); }
            set { this[EntityMappingConstants.EntityShortTypeNameAttributeName] = value; }
        }

        [ConfigurationProperty(EntityMappingConstants.EntityFactoryFullTypeNameAttributeName,
            IsRequired=true)]
        public string EntityFactoryFullTypeName
        {
            get { return this[EntityMappingConstants.EntityFactoryFullTypeNameAttributeName].ToString(); }
            set { this[EntityMappingConstants.EntityFactoryFullTypeNameAttributeName] = value; }
        }
    }
}
